package com.wolfking.converter.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sql_filed_transform")
public class SqlFieldTransform {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * SQL定义的key
     */
    @TableField("define_key")
    private String defineKey;

    /**
     * 列名
     */
    @TableField("field_name")
    private String fieldName;

    /**
     * 转换器
     */
    @TableField("transform")
    private String transform;

    /**
     * 参数的格式
     */
    @TableField("construct_arg")
    private String constructArg;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 版本号
     */
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;
}
